package cn.xianyang.mapper;

import cn.xianyang.domain.Movie;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MovieMapper {

    List<Movie> findAll();
    //多参数mapper需要使用@Param注解
    void buyTickets(@Param("number") Long number, @Param("id") Long id);

    Movie findById(Long id);

    Movie findMaxTicket();
}
